#include "Decorator.h"

#include <iostream>
using namespace std;


HeroA::HeroA()
{
    cout << "HeroA::HeroA()" << endl;
    _Hp = 0;
    _Mp = 0;
    _At = 0;
    _Df = 0;
}


void HeroA::showStatus()
{
    cout << "HeroA::showStatus()" << endl;
    cout << "HP: " << _Hp << endl;
    cout << "MP: " << _Mp << endl;
    cout << "Attack: " << _At << endl;
    cout << "defense: " << _Df << endl;
}

AbstractEquipment::AbstractEquipment(AbstractHero* hero)
{
    cout << "AbstractEquipment::AbstractEquipment(AbstractHero* hero)" << endl;
    _pHero = hero;
}

void KuangtuEquipment::AddKuangtu()
{
    cout << "on kuangtu" << endl;
    this->_Hp = this->_pHero->_Hp + 100;
    this->_Mp = this->_pHero->_Mp;
    this->_At = this->_pHero->_At;
    this->_Df = this->_pHero->_Df + 30;
}

void KuangtuEquipment::showStatus()
{
    AddKuangtu();
    cout << "HP: " << _Hp << endl;
    cout << "MP: " << _Mp << endl;
    cout << "Attack: " << _At << endl;
    cout << "defense: " << _Df << endl;
}

void WujinzhirenEquipment::AddWujinzhiren()
{
    cout << "on Wujinzhiren" << endl;
    this->_Hp = this->_pHero->_Hp;
    this->_Mp = this->_pHero->_Mp;
    this->_At = this->_pHero->_At + 80;
    this->_Df = this->_pHero->_Df;
}

void WujinzhirenEquipment::showStatus()
{
    AddWujinzhiren();
    cout << "HP: " << _Hp << endl;
    cout << "MP: " << _Mp << endl;
    cout << "Attack: " << _At << endl;
    cout << "defense: " << _Df << endl;
}